package com.qf.erp_system.sys.controller;
import com.qf.erp_system.common.json.JsonResult;
import com.qf.erp_system.common.page.NumberParam;
import com.qf.erp_system.common.pojo.sys.SysNumber;
import com.qf.erp_system.sys.service.SysNumberService;
import com.qf.erp_system.sys.vo.PageVo;
import com.qf.erp_system.sys.vo.SysNumberVo;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/number")
public class SysNumberController {
    @Resource
    private SysNumberService sysNumberService;
    @GetMapping("/sysNumber")
    public JsonResult listSysNumber(NumberParam numberParam) {
        PageVo<SysNumberVo> vo = sysNumberService.listSysNumberVo(numberParam);
        return JsonResult.ok(0,vo);
    }
    @PostMapping("/add")
    public JsonResult add(SysNumber record) {
        sysNumberService.add(record);
        return JsonResult.ok();
    }
}
